package com.ruoyi.web.controller.community;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.community.domain.EcOrders;
import com.ruoyi.community.domain.EcRestaurants;
import com.ruoyi.community.mapper.EcOrdersMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/community/ec")
public class OrderController extends BaseController {
    @Autowired
    EcOrdersMapper ecOrdersMapper;

    @PreAuthorize("@ss.hasPermi('e-commerce:orders:list')")
    @GetMapping("/orders")
    public TableDataInfo getOrders(EcOrders ecOrders){
        startPage();
        logger.info("bbbb");
        logger.info(ecOrders.toString());
        List<EcOrders> list = ecOrdersMapper.selectEcOrdersList(ecOrders);
        return getDataTable(list);
    }
}
